﻿<%@ Page Title="" Language="C#" Inherits="System.Web.Mvc.ViewPage<PhotoGallery.Core.Business.Account>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>登录 - 重庆公安图片管理系统</title>
    <link href="/Content/login.css" rel="stylesheet" type="text/css" />
    <link href="/Content/global.css" type="text/css" rel="Stylesheet" charset="utf-8" />
    <script type="text/javascript" src="/Scripts/jquery-based.js" charset="utf-8"></script>
</head>
<body>
    <div id="con">
        <div id="logo">
        </div>
        <% using (Html.BeginForm("Login", "Account", FormMethod.Post, new { id = "mainForm" }))
           {%>
        <%: Html.ValidationSummary(true, "登录不成功。请更正错误并重试。") %>
        <div id="login-box">
            <p class="first">
                <label>
                    用户名：</label>&nbsp;<%= Html.TextBoxFor(model => model.LoginName, new { @class = "text w100", title = "必填项，16个字符以内", required = "required", maxlength = "16" })%>
            </p>
            <p>
                <label class="i" for="Password">
                    密&nbsp;&nbsp;码：
                </label>
                <%= Html.PasswordFor(model => model.Password, new { @class = "text w100", title = "必填项，3到16个常用字符(a-z|A-Z|-_!@#$等)或者数字的组合，区分大小写", pattern = @"[\x21-\x7e]{3,16}" })%>
            </p>
            <p>
                <input class="login" type="submit" value="登录" />
            </p>
        </div>
        <%} %>
    </div>
    <%
    
        if (ViewData["HintMessage"] != null)
        {
            HintMessage message = ViewData["HintMessage"] as HintMessage;
            if (message != null)
            {
                string className = "cy-ui-results " + ((message.Type == HintMessageType.Error) ? "error" : "");%>
    <script type="text/javascript">
        $(function(){
            cy.ui.showResult({ content:<%= PhotoGallery.Infrastructure.Helpers.JavascriptHelper.ToEscapedJavaScriptString(HttpUtility.HtmlEncode(message.Content), '\"', true) %>, className: '<%= className %>' });
        });
    </script>
    <%}
        } %>
</body>
</html>
